common: allow a default compiled-in command line using Kconfig
authorZhongze Liu <blackskygg@gmail.com>
Tue, 21 Mar 2017 14:14:21 +0000 (15:14 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 21 Mar 2017 14:20:30 +0000 (15:20 +0100)
commit27ef1ec55ef800af51f548c0a60ff27a9f17d799
treea29fd2db65cebd9a1ea8da6bc713428e0ea3cd46
parent0711b59b858af09d06e2a4bc2725c29c8ae27989
common: allow a default compiled-in command line using Kconfig

This allows downstreams to set their defaults without modifying the source code
all over the place. Also probably useful for the embedded space.
(See Also: https://xenproject.atlassian.net/browse/XEN-41)

If CMDLINE is set, it will be parsed prior to the bootloader command line.
This order of parsing implies that if any non-cumulative options are set in
both CMDLINE and the bootloader command line, only the ones in the latter will
take effect. Furthermore, if CMDLINE_OVERRIDE is set to y, the whole
bootloader command line will be ignored, which will be useful to work around
broken bootloaders. A wrapper to the original common/kernel.c:cmdline_parse()
was introduced to complete this task.

Signed-off-by: Zhongze Liu <blackskygg@gmail.com>
[jb: fix non-EXPERT build]
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/common/Kconfig
xen/common/kernel.c